using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Pampa.CRUD.Security;
using Pampa.WebControls;

using Pampa.CRUD.Configuration;
using Pampa.CRUD.Core;

namespace Pampa.CRUD.UI.CustomControls
{
    public abstract class EntityControl : BaseControl
    {
        object entity;
        string entityName;
        EntityConfiguration configuration;
        ISecurityManager securityManager;

        public object Entity
        {
            get
            {
                return entity;
            }
            set
            {
                entity = value;
                entityName = value.GetType().AssemblyQualifiedName;
            }
        }

        public virtual EntityConfiguration Configuration
        {
            get { return configuration; }
            set { configuration = value; }
        }

        public virtual string EntityName
        {
            get { return entityName; }
            set { entityName = value; }
        }

        public virtual ISecurityManager SecurityManager
        {
            get { return securityManager; }
            set { securityManager = value; }
        }
    }
}
